package arrayinarray;

import java.util.Random;

public class ArrayDemo3 {
    public static void main(String[] args) {
        //静态初始化二维数组
        int [][] arr = {{1,2,3},{4,5},{6,7,8,9}};
        System.out.println("arr = " + arr);

        //遍历二维数组中第一个一维数组的元素
        for (int j = 0; j < arr.length; j++) {  //遍历二维数组中一维数组的个数
            for (int i = 0; i < arr[j].length; i++) {  //遍历指定一维数组中的每一个元素
                System.out.println("i1 = " + arr[j][i]);
            }
        }

        Random r = new Random();
        int num = r.nextInt(100);
    }
}
